By plane
The closest airport is Ko Samui USM which has frequent flights from Bangkok and Phuket, daily flights from U-Tapao and Singapore, and several direct flights each week from Chiang Mai and Kuala Lumpur. Transportation to the ferry dock is easy to find at the airport. Ferries depart several times a day with the last one around dusk.
The next nearest airport is Surat Thani URT on the mainland. Flights from Bangkok there are significantly cheaper 1000-1500 baht in advance, or 2000-2500 if booked same day, instead of 3000-5000 if flying to Samui, as there are low-cost carriers AirAsia flying there, and even Thai Airways charge 30-50% less than to Samui. However, you'll then need combined bus + boat travel to get to Ko Pha Ngan, which will surely take several hours.
Nok Airways is now selling a combined package ticket including airfare to Surat Thani or Nakhon Si Thammarat, bus ride to the pier, and a ticket on the Lomprayah Hi-speed Catamaran. This should be simpler for travelers than arranging the individual segments separately. Note that Nok uses the old airport in Bangkok, Don Mueang.
By Train, Boat And Bus
Overnight train from Bangkok is an interesting option. Trains arrive in Surat Thani or Chumphon, and from there you can transfer by bus and then boat. Chumphon is the option if you're planning to stop by at Ko Tao but if you're heading straight to Ko Phan Ngan consider Surat Thani. Both stations are on the south-bounding Hay Yai line but arrival times in Chumphon when using night trains are annoyingly early in the morning. For example, the recommended express train number #85 arrives around 4am after which you'll have to wait about 3 hours for the ferry. On the other hand, if you continue down to Surat Thani you can sleep an extra 3-4 hours plus you will arrive in daylight. Considering the waiting time in Chumphon and the longer ferry trip you will eventually get to Ko Pha Ngan at about the same time.
Combined train-bus-boat tickets can be bought direct from the official Advance Booking Counter at Hualamphong station in Bangkok, although if your train is late, and your boat is already gone then you will have to pay extra for the next boat. Thus the joint ticket may not be the best choice.
If e-booking is not available or not suitable to you for some reason, train tickets may be reserved up to 60 days in advance and paid for by email. In reality, the Thai authorities are lax in returning emails and/or will give the runaround, or flat-out refuse to reserve seats for non-Thais during peak travel periods December - January and Songkran holiday in April. If your heart is set on going by train, start early, be persistent, and have a backup plan to go by bus or plane.
Upon arrival at the pier or all around island don't forget to pick up a free guide book Phangan.info with a lot of useful information for travellers ferry timetables, prices of taxi boats, taxi trucks, where to eat, what to do/see, party dates, maps, accommodation and more.